<?php
//启用管理员
    header("Access-Control-Allow-Origin: *"); // 允许跨域的地址，* 表示全部
    header("Access-Control-Allow-Methods", "PUT,POST,GET,DELETE,OPTIONS"); // 允许的请求方法
    header("Access-Control-Allow-Headers: version, access-token, user-token"); // 允许的请求头属性

    include '../util/connect.php';

    $Phone = $_POST['Phone'];

    $sql = "update admin set Status='0' where Phone = $Phone";
    $result = my_ZSG($sql);

    if($result){
        $arr = [
            "status" => 0,
            "message" => "管理员启用成功"
        ];
    }else{
        $arr = [
            "status" => 1,
            "message" => "管理员启用失败"
        ];
    }

    echo json_encode($arr,JSON_UNESCAPED_UNICODE);